﻿@model DiplomaWeb.Models.ConsultantOfPart.ConsultantOfPartListViewModel

<div>
@using (Html.BeginRouteForm("Default", new { controller = "SystemManagers", action = "ConsultantOfPart" }, FormMethod.Post)) {
    for (var i = 0; i < Model.ConsultantOfParts.Count; i++)
    {
        <div style="margin: 10px;">
            @Html.HiddenFor(r => r.ConsultantOfParts[i].Id)
            @Html.TextBoxFor(r => r.ConsultantOfParts[i].Text, new { style = "width: 700px;" })
            <a href="@Url.RouteUrl("Default", new { action = "DeleteConsultantOfPart", controller = "SystemManagers", Model.ConsultantOfParts[i].Id })">
                <img src="@Url.Content("~/Content/Icons/delete.png")" width="15" height="15" />
            </a>
        </div>
    }
    <input type="submit" value="Update" style="margin-left: 10px; margin-bottom: 50px;"/>
}
@using (Html.BeginRouteForm("Default", new { controller = "SystemManagers", action = "AddConsultantOfPart" }, FormMethod.Post))
{
    <div>
        @Html.TextBox("Text", null, new { style = "width: 700px;" })
        <input type="submit" value="Add"/>
    </div>
}
</div>